Is it possible to get the difference of two buffers (as blue color for insertion and red color strikethrough for deletion) and send it to Word document. |
Re: Buffer compare Mathias Mamsch, IT-QBase GmbH, Consultant for Requirement Engineering and D00RS |
Re: Buffer compare Buffer bufDiff = create() Buffer bufFrom = create() Buffer bufTo = create() bufFrom = Old text bufTo = new text string ErrMess = diff(bufDiff, bufFrom, bufTo) send bufDiff to MS-Word. It does not seem reasonable to me to attempt to show these differences for two texts that contain rich text markup; e.g. if one has bold and the other italic or one has strikeouts; what would the difference look like? So if the text is in attributes retrieve it with "obj.NameAttr" instead of "richText(obj.NameAttr)". When in doubt you can convert it to raw text with "bufFrom = plainText(TextRich)". My functions that do this work have mutated and been mung'd so much that I'm deeply suspicious there is a far simpler way of getting the difference into MS-Word. That, and long ago I settled into writing and closing a file and then openning that file with Word; whereas most folks here invoke Word and use OLE to send it stuff directly. I'm guessing: (1) use the full RTF option in the command: ...string ErrMess = diff(bufDiff, bufFrom, bufTo, true) (2) Take Mathias advise on tranfer to Word. There may be a problem when the raw text contains these special characters: {}/.
|